package com.qf.service;

import com.codingapi.txlcn.tc.annotation.LcnTransaction;
import com.qf.dao.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author 汤奇
 * @version V1.0
 * @Project BookPro
 * @Package com.qf.service
 * @Description:
 * @Date 2022/7/12 12:23
 */
@Service
public class UserServiceImpl implements UserService{

    @Autowired
    private UserMapper userMapper;

    @Override
    @Transactional
    @LcnTransaction
    public void bAdd() {
        userMapper.bAdd();
        //创建异常让事务回滚
        int i = 1/0;
    }
}
